var mongoose = require('mongoose');
require("./model/adminsModel");
require("./model/moviesModel");
require("./model/cinemasModel");
require("./model/dateModel");
require("./model/schedulesModel");
require("./model/seatingModel.js");
require("./model/seatsModel.js");
require("./model/theatersModel.js");
require("./model/usersModel.js");

//建立数据库连接
mongoose.connect('mongodb://localhost/adminsystem', {
    useUnifiedTopology: true,
    useNewUrlParser: true
});
mongoose.connection.on('connected', function () {
    console.log('Mongoose connected to mongodb://localhost/adminsystem');
});

